All Questions
8 questions
2votes
0answers
332views
How to automate Ansible SSH login with Duo MFA for sudo access
The problem: I'm trying to run Ansible on a Mac to remotely configure a linux (ubuntu) server that requires MFA access for sudo usage. My goal is to keep the MFA in place (as required by our security ...
6votes
2answers
1kviews
What causes \r's to be inserted before \n's when retrieving a binary file over ssh, and how do I circumvent it?
I have inherited a Ubuntu 14.04 production server which needs to be upgraded to 20.04, and I would like a sandboxed version to experiment with first, hence I want to dump and restore the filesystems ...
1vote
1answer
8kviews
Disable su and sudo access for users
I have created a couple of users who use their SSH Keys to log in on a server. I don't want any user to have root access, i.e, no user should be able to do sudo su or su - another user. When I check ...
2votes
2answers
355views
Setting up users for ubuntu for ssh connection
I have created a new Ubuntu server and in root user, I created a new user. The steps I followed: sudo adduser tom sudo su - tom mkdir .ssh chmod 700 .ssh touch .ssh/authorized_keys chmod 600 .ssh/...
1vote
0answers
129views
How to send sudo password over pipe? [duplicate]
I need to replace existing sshd config on the remote PC and restart sshd, so I try to use this: cat /sshd_cfg | ssh [email protected] "cat > /etc/ssh/sshd_config && service sshd restart" ...
7votes
2answers
13kviews
PAM failing to authenticate sudo, after successfully contacting ssh-agent
Setting up PAM sudo authentication, using ssh-agent, on 14.04.1-Ubuntu server LTS. I'm still unable to successfully authenticate sudo, via the ssh-agent, using PAM. Here are my relevant /var/log/...
3votes
2answers
10kviews
SSH + Sudo + Expect in Bash script: Run command with sudo in remote machine
I am trying to automate the deploy of some .deb packages with an script. I want to execute sudo dpkg -i $myDeb.deb in a list of remote machines I can access with ssh. I've tried to automate the ...
46votes
7answers
164kviews
Can a linux user change their password without knowing the current password?
I'm setting up a few ubuntu boxes, and using opscode's chef as a configuration tool. It would be fairly easy to install public keys for each user on each of these servers, and disable password ...